<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>随手快递</title>
    <link rel="stylesheet" type="text/css" href="../../AUI/css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../font-awesome/css/font-awesome.min.css" />
    <style>
        .star{position:relative;width:600px;margin:20px auto;height:24px;}
        .star ul,.star span{float:left;display:inline;height:19px;line-height:19px;}
        .star ul{margin:0 10px;}
        .star li{float:left;width:24px;cursor:pointer;text-indent:-9999px;background:url(../../myImage/star.png) no-repeat;}
        .star strong{color:#f60;padding-left:0px;}
        .star li.on{background-position:0 -28px;}
        .star p{position:absolute;top:20px;width:159px;height:60px;display:none;background:url(../../myImage/icon.gif) no-repeat;padding:7px 10px 0;}
        .star p em{color:#f60;display:block;font-style:normal;}

    </style>
</head>
<body >
<header class="aui-bar aui-bar-nav" id="aui-header">
    <a class="aui-btn aui-pull-left" tapmode onclick="history.back();">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">申请退款</div>
    <div class="aui-btn aui-pull-right" style="font-size: 14px" onclick="submitReas()">提交</div>

</header>
<section class="aui-content" style="margin-top: 46px">
    <div class="aui-card-list">
        <div class="aui-card-list-header aui-card-list-user aui-border-b" >
            <div style="margin-bottom: 8px;">退款原因：</div>
            <ul class="aui-list aui-form-list" style="border: 1px solid #ddd">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-input"><textarea id="reason" placeholder="必填" style="height:300px;font-size: 14px;border:0px solid #ddd"></textarea>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    </div>
</section>

<script type="text/javascript" src="../../AUI/script/api.js" ></script>
<script src="../../myJs/jquery.js"></script>
<script src="../../myJs/jquery.cookie.js"></script>
<script type="text/javascript" src="../../myJs/index.js" ></script>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
    }
    function submitReas(){
        if($("#reason").val()==""){
            alertmd("请填写退款原因");
        }
        else{
            var orderId = sessionStorage.getItem("orderId");
            var refundReason = $("#reason").val()
            $.ajax({
             type: "post",
             url: '/randomdelivery/userDemandController/userRefund',
             data: {
             "orderId": orderId,
             "refundReason": refundReason
             },
             datatype: "json",
             success: function (data) {
            	 location.href="orderDetails.html";
             }
             });
            
        }
    }
</script>
</body>
</html>